const mongoose = require('../config/db/mongo');
const moment = require('moment');
const Schema = mongoose.Schema;
const schemaOptions = {
    versionKey: false
}
const staff = new Schema({


    openid: String,
    unionID: String,
    cellphone: String,
    createdAt: { type: Date, default: Date.now },
    updatedAt: { type: Date },
    name: String,
    store: [{ type: mongoose.SchemaTypes.ObjectId, ref: 'store' }],
    isDelete: Number,


}, schemaOptions);

// methods ====================== 提高数据库检索速度 按顺序

// create the model for users and expose it to our app
module.exports = mongoose.model('staff', staff, 'staff');